import { getData, postData } from "@/utils/request";

/**
 * 查询转组织申请列表
 */
export const getTransferList = async (userNumber) => {
    return await postData('/serviceChangeOrganization/queryApplyList', userNumber);
};

/**
 * 查询转组织申请进度
 */
export const getTransferProgress = async (applicationId) => {
    return await getData(`/serviceChangeOrganization/queryApplicationProgress/${applicationId}`);
};

/**
 * 查询可选的组织
 */
export const getOrganizations = async () => {
    return await getData('/sysOrganizationalStructure/queryOrganizationChoice');
};

/**
 * 提交转组织申请
 */
export const submitApplication = async (info) => {
    return await postData('/serviceChangeOrganization/submitChangeOrganizationApply', info);
};

/**
 * 重新提交转组织申请
 */
export const reSubmitApplication = async (info) => {
    return await postData('/serviceChangeOrganization/resubmit', info);
};

/**
 * 查询转组织申请详情
 */
export const getTransferDetail = async (applicationId) => {
    return await getData(`/serviceChangeOrganization/queryApplicationDetail/${applicationId}`);
};